package com.zx.sercurity.rootdetectorplus;

import android.content.Context;

import com.zx.sercurity.rootdetectorplus.detector.NativeChecks;

import java.util.ArrayList;
import java.util.List;

public class RootDetectorPlus {

    public static List<String> checkAll(Context context) {
        ArrayList<String> result = new ArrayList<>();

        // Native层检测（JNI）
        if (NativeChecks.checkSeccomp() == 1) {
            result.add("Zygisk 注入过程中可能绕过 SECCOMP 审查，检测当前进程启用 seccomp");
        }
        if (NativeChecks.checkSelinuxEnforce() == 1){
            result.add("宽容模式已启用");
        }
//        if (NativeChecks.checkPtrace() == 1){
//            result.add("系统已启用hook");
//        }
        if (NativeChecks.checkAnonymousMaps() == 1){
            result.add("内存映射是否存在伪装模块（Zygisk 特有）");
        }
        if (NativeChecks.checkLibcHook() == 1){
            result.add("检查到被劫持的函数指针");
        }
        return result;
    }
}
